undefined method `parameterize' for nil:NilClass
Posted
by Senthil
on Stack Overflow
See other posts from Stack Overflow
or by Senthil
Published on 2010-04-28T23:10:35Z
Indexed on
2010/04/28
23:17 UTC
Read the original article
Hit count: 216
ruby-on-rails
I've been trying to do SEO friendly urls, and managed to get it work, but when I call index action on blogs, I get a weird "undefined method `parameterize' for nil:NilClass." The method works when using show method.
def to_s
title
end
def to_param
"#{id}-#{to_s.parameterize}"
end
© Stack Overflow or respective owner